﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage_List.master" AutoEventWireup="true" CodeFile="SaleList.aspx.cs" Inherits="Sale_SaleList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Title" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Search" runat="Server">
    <span>单据日期：</span>
    <select id="ddl_SaleTimeDay" class="ht-select" style="width: 80px">
        <option value="7">7天以内</option>
        <option value="30" selected="selected">30天以内</option>
        <option value="60">60天以内</option>
        <option value="-1">全部</option>
    </select>
    <input class="easyui-searchbox" data-options="prompt:'模糊查询',searcher:doSearch" style="width: 300px" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="Content" runat="Server">
    <div class="ht-panel-grid">
        <input type="hidden" id="hf_grid_order" />
        <table id="grid" class="ht-grid" border="0" style="margin-top: 10px;">
            <thead>
                <tr>
                    <th class="th-order" data-field="SaleCode">销售单号</th>
                    <th class="th-order" data-field="SaleTime">单据日期</th>
                    <th class="th-order" data-field="CustomerName">客户名称</th>
                    <th class="th-order" data-field="Salesman">销售员</th>
                    <th class="th-order" data-field="ExchangeRate">收款汇率</th>
                    <th class="th-order" data-field="Freight">实付运费</th>
                    <th class="th-order" data-field="PayFreight">收客户运费</th>
                    <th class="th-order" data-field="Payment">款项</th>
                    <th class="th-order" data-field="StateId">状态</th>
                    <th class="th-order" data-field="Description">备注</th>
                    <th style="width: 120px;">操作</th>
                </tr>
            </thead>
            <tbody>
            </tbody>
        </table>
    </div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="Pager" runat="Server">
    <div id="pager"></div>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="Footer" runat="Server">
    <!--数据加载-->
    <script type="text/javascript">
        var sQueryString = "";
        var iSaleTimeDay = 30;

        $(function () {
            //加载数据
            refreshGrid();

            $('#ddl_SaleTimeDay').change(function () {
                iSaleTimeDay = $(this).val();
                refreshGrid();
            });
        });

        function doSearch(value) {
            sQueryString = value;
            refreshGrid();
        }

        function refreshGrid() {
            $('#grid').BangleGrid({
                pager: '#pager',
                url: 'SaleList.aspx/GetGridDataHtml',
                query: { QueryString: sQueryString, SaleTimeDay: iSaleTimeDay }
            });
        }

    </script>

</asp:Content>

